package com.bandit;

import com.bandit.config.RpcServiceConfig;
import com.bandit.proxy.RpcClientProxy;
import com.bandit.remoting.transport.socket.RpcSocketClient;
import com.bandit.service.UserService;

/**
 * @author Bandit
 * @create 2022/2/24 13:07
 */
public class SocketClientMain {
    public static void main(String[] args) {
        RpcSocketClient rpcSocketClient = new RpcSocketClient();
        RpcServiceConfig rpcServiceConfig = new RpcServiceConfig();
        RpcClientProxy rpcClientProxy = new RpcClientProxy(rpcSocketClient, rpcServiceConfig);
        UserService userService = rpcClientProxy.getProxy(UserService.class);
        System.out.println(userService.getUserById(1));

    }
}
